module.exports = {
  terserOptions: {
    compress: {
      arrows: false,
      collapse_vars: false,
      comparisons: false,
      computed_props: false,
      hoist_funs: false,
      hoist_props: false,
      hoist_vars: false,
      inline: false,
      loops: false,
      negate_iife: false,
      properties: false,
      reduce_funcs: false,
      reduce_vars: false,
      switches: false,
      toplevel: false,
      typeofs: false,
      booleans: true,
      if_return: true,
      sequences: true,
      unused: true,
      conditionals: true,
      dead_code: true,
      evaluate: true,
      drop_console: true,
      drop_debugger: true
    },
    keep_fnames: true, // 修复：组件名称默认为class'name 导致vue-create-api创建的全局方法在build时候被混淆，全局获取不到
    mangle: {
      safari10: true
    }
  },
  // reset options.productionSourceMap
  sourceMap: true,
  cache: true,
  // reset options.parallel
  parallel: true
}
